class Cartasur::Question < Cartasur::CartasurModel
  has_many :answers, :class_name => 'Cartasur::Answer'

  QUESTION_TYPES = {
      survey: 0,
      questionnaire: 1
  }
  attr_accessible :id, :text, :details, :number, :question_type


   def self.get_questions(type=0)
     where(:question_type => type).order(:number).all
   end
end